import ajax from './ajax'
import {PRESENT_LIST,PRESENT_UPDATE,PRESENT_ADD,PRESENT_DELETE} from '../config/gift.config'
//礼品列表
export function giftListApi(params) {
    return ajax({
        url: PRESENT_LIST,
        params
    })
}
//礼品保存
export function giftUpdateApi(data) {
    return ajax({
        url: PRESENT_UPDATE,
        method:'POST',
        data,
    })
}
//礼品新增
export function giftAddApi(data){
    return ajax({
        url:PRESENT_ADD,
        method:'PUT',
        data
    })
}
//礼品删除
export function giftDeleteApi(id){
    return ajax({
        url:PRESENT_DELETE+id,
        method:'DELETE'
    })
}